﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PAMD.Database;
using System.Web.Mvc;

namespace PAMD.Business.Models
{
    public class ListingModel
    {
        public ListingModel()
        {
            Listing = new Listing();
            Address = new Address();

            PriceListFinal = string.Empty;
            FileList = string.Empty;

            Listing.NumberOfSpace = 1;
            SpaceCategoryList = new List<SelectListItem> { new SelectListItem { Text = "Driveway", Value = "Driveway" }, new SelectListItem { Text = "Commercial park", Value = "Commercial park" } };
            MinRentalPeriodList = new List<SelectListItem>();
            MinRentalPeriodUnitList = new List<SelectListItem>();
            VehicleList = new List<SelectListItem>();

            MinRentalPeriodUnitList.Add(new SelectListItem { Text = "Hour", Value = "Hour" });
            MinRentalPeriodUnitList.Add(new SelectListItem { Text = "Day", Value = "Day", Selected = true });
            MinRentalPeriodUnitList.Add(new SelectListItem { Text = "Week", Value = "Week" });
            MinRentalPeriodUnitList.Add(new SelectListItem { Text = "Month", Value = "Month" });
            MinRentalPeriodUnitList.Add(new SelectListItem { Text = "Year", Value = "Year" });

            VehicleList.Add(new SelectListItem { Text = "Car", Value = "Car" });
            VehicleList.Add(new SelectListItem { Text = "Large Vehicle", Value = "Large Vehicle" });
            VehicleList.Add(new SelectListItem { Text = "Motorcycle", Value = "Motorcycle" });
            VehicleList.Add(new SelectListItem { Text = "All Vehicle", Value = "All Vehicle" });
            
            for (int i = 1; i <= 30; i++)
            {
                MinRentalPeriodList.Add(new SelectListItem { Text = i.ToString(), Value = i.ToString() });
            }
        }

        public Listing Listing { get; set; }
        public Address Address { get; set; }

        public List<SelectListItem> Countries { get; set; }
        public List<SelectListItem> SpaceCategoryList { get; set; }
        public List<SelectListItem> MinRentalPeriodList { get; set; }
        public List<SelectListItem> MinRentalPeriodUnitList { get; set; }
        public List<SelectListItem> VehicleList { get; set; }

        public string PriceListFinal { get; set; }
        public string FileList { get; set; }
    }
}